package com.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class JUC_Callable_30 {

    static class Test implements Callable<String>{
        @Override
        public String call() throws Exception {
            return "test";
        }
    }

    public static void main(String[] args) throws Exception {

        Test tt = new Test();

        Thread t = new Thread(new FutureTask<String>(tt));
        t.start();
        System.out.println(tt.call());
    }
}
